home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 351-375 / disk_351 / pdc / libsrc.lzh / LibSrc / Math / log10.c < prev    next >
C/C++ Source or Header  |  1990-04-07  |  2KB  |  79 lines

  1. /************************************************************************
  2.  *                                                                      *
  3.  *                              N O T I C E                             *
  4.  *                                                                      *
  5.  *                      Copyright Abandoned, 1987, Fred Fish            *
  6.  *                                                                      *
  7.  *      This previously copyrighted work has been placed into the       *
  8.  *      public domain by the author (Fred Fish) and may be freely used  *
  9.  *      for any purpose, private or commercial.  I would appreciate     *
  10.  *      it, as a courtesy, if this notice is left in all copies and     *
  11.  *      derivative works.  Thank you, and enjoy...                      *
  12.  *                                                                      *
  13.  *      The author makes no warranty of any kind with respect to this   *
  14.  *      product and explicitly disclaims any implied warranties of      *
  15.  *      merchantability or fitness for any particular purpose.          *
  16.  *                                                                      *
  17.  ************************************************************************
  18.  */
  19.  
  20. /*
  21.  *  FUNCTION
  22.  *
  23.  *      log10   double precision common log
  24.  *
  25.  *  KEY WORDS
  26.  *
  27.  *      log10
  28.  *      machine independent routines
  29.  *      math libraries
  30.  *
  31.  *  DESCRIPTION
  32.  *
  33.  *      Returns double precision common log of double precision
  34.  *      floating point argument.
  35.  *
  36.  *  USAGE
  37.  *
  38.  *      double log10 (x)
  39.  *      double x;
  40.  *
  41.  *  REFERENCES
  42.  *
  43.  *      PDP-11 Fortran IV-plus users guide, Digital Equip. Corp.,
  44.  *      1975, pp. B-3.
  45.  *
  46.  *  RESTRICTIONS
  47.  *
  48.  *      For precision information refer to documentation of the
  49.  *      floating point library routines called.
  50.  *      
  51.  *  PROGRAMMER
  52.  *
  53.  *      Fred Fish
  54.  *
  55.  *  INTERNALS
  56.  *
  57.  *      Computes log10(x) from:
  58.  *
  59.  *              log10(x) = log10(e) * log(x)
  60.  *
  61.  */
  62.  
  63. #include <stdio.h>
  64. #include "pml.h"
  65.  
  66. static char funcname[] = "log10";
  67.  
  68. double log10 (x)
  69. double x;
  70. {
  71.     extern double log ();
  72.  
  73.     DBUG_ENTER (funcname);
  74.     DBUG_3 ("log10in", "arg %le", x);
  75.     x = LOG10E * log (x);
  76.     DBUG_3 ("log10out", "result %le", x);
  77.     DBUG_RETURN (x);
  78. }
  79.